from sqlalchemy import String, Column, Float, Text, BigInteger, Integer, DateTime
from config.database import Base


class SaleDailyPrice(Base):
    """
    每日采购价记录表
    """

    __tablename__ = 'sale_daily_price'

    sale_price_id = Column(Integer, primary_key=True, nullable=False, autoincrement=True, comment='飞书记录ID')
    year = Column(BigInteger, nullable=True, comment='数据年份')
    create_by = Column(Text, nullable=True, comment='发布人')
    create_time = Column(BigInteger, nullable=True, comment='发布时间')
    price = Column(Float, nullable=True, comment='收购单价')
    sale_date = Column(DateTime, nullable=True, comment='收购日期')
    update_by = Column(Text, nullable=True, comment='更新人')
    update_time = Column(BigInteger, nullable=True, comment='更新时间')
    product_size = Column(String(255), nullable=True, comment='产品规格')
    vendor_name = Column(String(255), nullable=True, comment='种植主体名称')
    vendor_id = Column(Integer, nullable=True, comment='种植主体id')
    product_area_id = Column(Integer, nullable=True, comment='产区id')
    product_area = Column(String(255), nullable=True, comment='产区')



